package com.red.wood.module.system.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.red.wood.module.system.dao.CitiesDao;

@Repository
public class CitiesDaoImpl implements CitiesDao{

	@Autowired
	private JdbcTemplate jdbcTemplate;
	
	public List<Map<String, Object>> getByProvinceid(String provinceid){
		StringBuffer sql = new StringBuffer();
		sql.append("select id as id, cityid as cityid, city as city, provinceid as provinceid from cities where provinceid =" + provinceid);
		return jdbcTemplate.queryForList(sql.toString());
	}

}
